<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
echo '
    <script type="text/javascript">
    function showSubBox(str)
{
if (str=="")
  {
  document.getElementById("txtTagBox").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {
  xmlhttp=new XMLHttpRequest();
  }
else
  {
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("txtTagBox").innerHTML=xmlhttp.responseText;
    }
  }

xmlhttp.open("GET", "plugin/base/cms/tags/getsubtags.php?q="+str,true);
xmlhttp.send();
}
</script>
<script type="text/javascript">
function showSub(str)
{
if (str=="")
  {
  document.getElementById("txtHint3").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {
  xmlhttp=new XMLHttpRequest();
  }
else
  {
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("txtHint3").innerHTML=xmlhttp.responseText;
    }
  }

xmlhttp.open("GET", "plugin/base/cms/tags/gettag.php?q="+str,true);
xmlhttp.send();
}
</script>

<script type="text/javascript">
function showDrag(str)
{
if (str=="")
  {
  document.getElementById("test-list").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {
  xmlhttp=new XMLHttpRequest();
  }
else
  {
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("test-list").innerHTML=xmlhttp.responseText;
    }
  }

xmlhttp.open("GET", "plugin/base/cms/tags/getdrag.php?q="+str,true);
xmlhttp.send();
}
</script>';

echo '

<script type="text/javascript" src="jquery/drag/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="jquery/drag/jquery-ui-1.7.1.custom.min.js"></script>
<link rel=\'stylesheet\' href=\'jquery/drag/styles.css\' type=\'text/css\' media=\'all\' />
<script type="text/javascript">
  // When the document is ready set up our sortable with it\'s inherant function(s)
  $(document).ready(function() {
    $("#test-list").sortable({
      handle : \'.handle\',
      update : function () {
		  var order = $(\'#test-list\').sortable(\'serialize\');
  		$("#info").load("jquery/drag/process-tag.php?"+order);
      }
  });
});

</script>

';
?>
